/*    */ package com.zimbra.cs.index.query;
/*    */ 
/*    */ import com.zimbra.cs.index.LuceneQueryOperation;
/*    */ import com.zimbra.cs.index.QueryOperation;
/*    */ import com.zimbra.cs.mailbox.Mailbox;
/*    */ import org.apache.lucene.index.Term;
/*    */ import org.apache.lucene.search.TermQuery;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public final class DomainQuery
/*    */   extends Query
/*    */ {
/*    */   private final String field;
/*    */   private final String term;
/*    */   
/*    */   public DomainQuery(String field, String term)
/*    */   {
/* 37 */     this.field = field;
/* 38 */     this.term = term;
/*    */   }
/*    */   
/*    */   public boolean hasTextOperation()
/*    */   {
/* 43 */     return true;
/*    */   }
/*    */   
/*    */   public QueryOperation compile(Mailbox mbox, boolean bool)
/*    */   {
/* 48 */     LuceneQueryOperation op = new LuceneQueryOperation();
/* 49 */     op.addClause(toQueryString(this.field, this.term), new TermQuery(new Term(this.field, this.term)), evalBool(bool));
/* 50 */     return op;
/*    */   }
/*    */   
/*    */   public void dump(StringBuilder out)
/*    */   {
/* 55 */     out.append("DOMAIN:");
/* 56 */     out.append(this.term);
/*    */   }
/*    */   
/*    */   public void sanitizedDump(StringBuilder out)
/*    */   {
/* 61 */     out.append("DOMAIN:");
/* 62 */     out.append("$TEXT");
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/index/query/DomainQuery.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */